<html>
<head><meta charset="utf-8"><title>sync up · project-ffi-unwind · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/index.html">project-ffi-unwind</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html">sync up</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185531507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185531507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185531507">(Jan 13 2020 at 20:02)</a>:</h4>
<p>Hey <span class="user-group-mention" data-user-group-id="1866">@WG-ffi-unwind</span> -- should we sync? Do we want to try this over zoom to move faster maybe?</p>



<a name="185531537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185531537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185531537">(Jan 13 2020 at 20:02)</a>:</h4>
<p>Yes, I was planning to do it with Zoom.</p>



<a name="185531578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185531578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185531578">(Jan 13 2020 at 20:02)</a>:</h4>
<p><a href="https://mozilla.zoom.us/j/992070648" target="_blank" title="https://mozilla.zoom.us/j/992070648">Zoom link</a></p>



<a name="185531639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185531639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> acfoltzer <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185531639">(Jan 13 2020 at 20:03)</a>:</h4>
<p>aaa sorry, I didn't realize we had settled on a time. I'll be able to join in ~10 minutes</p>



<a name="185531730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185531730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185531730">(Jan 13 2020 at 20:04)</a>:</h4>
<p><a href="https://paper.dropbox.com/doc/ffi-unwind-2020-01-13--AsXZAoB9KIBh4QYmzEYr~ke3Ag-agituL322N0qRsCbcnn7D" target="_blank" title="https://paper.dropbox.com/doc/ffi-unwind-2020-01-13--AsXZAoB9KIBh4QYmzEYr~ke3Ag-agituL322N0qRsCbcnn7D">paper doc</a></p>



<a name="185531807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185531807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185531807">(Jan 13 2020 at 20:05)</a>:</h4>
<p>( cc <span class="user-mention" data-user-id="143274">@Amanieu</span> <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span> )</p>



<a name="185531825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185531825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185531825">(Jan 13 2020 at 20:05)</a>:</h4>
<p>not sure why you're not in the alias :)</p>



<a name="185542486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185542486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185542486">(Jan 13 2020 at 22:00)</a>:</h4>
<p>OK so</p>



<a name="185542498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185542498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185542498">(Jan 13 2020 at 22:00)</a>:</h4>
<p>something we said at the made me realize the catch with 1C</p>



<a name="185542520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185542520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185542520">(Jan 13 2020 at 22:00)</a>:</h4>
<p>which is basically that one of our goals was to add shims <em>in Cpanic=unwind</em> to catch exceptions across the "C" boundary</p>



<a name="185542537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185542537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185542537">(Jan 13 2020 at 22:00)</a>:</h4>
<p>since it is Cpanic=unwind, we cannot just make dtors abort</p>



<a name="185542565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185542565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185542565">(Jan 13 2020 at 22:01)</a>:</h4>
<p>so we have to have a shim that permits longjmp but not other exceptions, presumably</p>



<a name="185542580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185542580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185542580">(Jan 13 2020 at 22:01)</a>:</h4>
<p>which means that you can't say "UB to unwind if there are destrutors in scope" without clarifying the kind of unwinding</p>



<a name="185542705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185542705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185542705">(Jan 13 2020 at 22:02)</a>:</h4>
<p>even so .. I think it might be preferable, or else a variant 1d where you say</p>
<ul>
<li>C ABI (UB to unwind except for forced exc. w/o dtor in scope)</li>
<li>C unwind ABI (follows -Cpanic=unwind to unwind/abort)</li>
</ul>



<a name="185542749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185542749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185542749">(Jan 13 2020 at 22:03)</a>:</h4>
<p>but honestly I'm not convinced that the cure here is worse than the disease...</p>



<a name="185543120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185543120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185543120">(Jan 13 2020 at 22:07)</a>:</h4>
<p>I should raise one other option</p>



<a name="185543143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185543143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185543143">(Jan 13 2020 at 22:07)</a>:</h4>
<p>nm</p>



<a name="185544370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185544370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185544370">(Jan 13 2020 at 22:21)</a>:</h4>
<p>ok, I wrote out the other option. In short, if we sacrifice C++ exception interop, you get what seems to me to be a relatively minimal diff on today's ABI, and one that leaves some room for future decisions:</p>
<ul>
<li>You only have "C" ABI. Unwinding across a frame is UB unless<br>
    * the unwinding originated in a Rust panic<br>
    * the unwinding is a forced exception and there are no destructors</li>
</ul>
<p>You need the forced exception distinction if you want to insert shims in <code>-Cpanic=unwind</code> mode.</p>
<p>In <code>-Cpanic=abort</code> mode, you can add shims to destructor calls to abort, since they should neve run.</p>
<p>In both cases, you probably only want the shims in debug builds, but they correspond to cases that are supposed to be UB.</p>



<a name="185546590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185546590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> acfoltzer <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185546590">(Jan 13 2020 at 22:49)</a>:</h4>
<blockquote>
<p>shims in <code>-Cpanic=unwind</code> mode.</p>
</blockquote>
<p>what would these shims be for? aborting on a non-Rust, non-forced exception?</p>



<a name="185547858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185547858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185547858">(Jan 13 2020 at 23:05)</a>:</h4>
<p>Yes, just catching accidental propagation</p>



<a name="185547860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/185547860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#185547860">(Jan 13 2020 at 23:05)</a>:</h4>
<p>Maybe there's not much point</p>



<a name="188301452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188301452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188301452">(Feb 15 2020 at 22:31)</a>:</h4>
<p><span class="user-group-mention" data-user-group-id="1866">@WG-ffi-unwind</span> I replaced Niko's "big ol' table" of desiderata with a table of the behaviors of different types of unwinding for each strategy we considered. I highlighted "unusual" features of each strategy, using orange where the difference is an unexpected footgun and green where it's an advantage of some kind.</p>



<a name="188301508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188301508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188301508">(Feb 15 2020 at 22:32)</a>:</h4>
<p>I also assigned names to options 1, 1c, and 3</p>



<a name="188301516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188301516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188301516">(Feb 15 2020 at 22:32)</a>:</h4>
<p>If anyone's available to double-check the table entries, and/or to provide feedback on the names and highlighting, I'd appreciate it!</p>



<a name="188301523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188301523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188301523">(Feb 15 2020 at 22:33)</a>:</h4>
<p><a href="https://paper.dropbox.com/doc/ffi-unwind-2020-01-13--AuYm0xrr9_LR66E9da6xBEL4Ag-agituL322N0qRsCbcnn7D" target="_blank" title="https://paper.dropbox.com/doc/ffi-unwind-2020-01-13--AuYm0xrr9_LR66E9da6xBEL4Ag-agituL322N0qRsCbcnn7D">https://paper.dropbox.com/doc/ffi-unwind-2020-01-13--AuYm0xrr9_LR66E9da6xBEL4Ag-agituL322N0qRsCbcnn7D</a></p>



<a name="188301580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188301580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188301580">(Feb 15 2020 at 22:34)</a>:</h4>
<p>I did not include Niko's added "after the fact" suggestion.</p>



<a name="188303015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188303015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188303015">(Feb 15 2020 at 23:22)</a>:</h4>
<p>I've now fleshed out my draft of the blog post announcing the upcoming meeting: <a href="https://github.com/rust-lang/project-ffi-unwind/pull/21" target="_blank" title="https://github.com/rust-lang/project-ffi-unwind/pull/21">https://github.com/rust-lang/project-ffi-unwind/pull/21</a></p>



<a name="188303024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188303024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188303024">(Feb 15 2020 at 23:23)</a>:</h4>
<p>I kept the "background" section, because it isn't terribly long.</p>



<a name="188303518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188303518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188303518">(Feb 15 2020 at 23:39)</a>:</h4>
<p>Okay, I think it's pretty close to ready. <span class="user-mention" data-user-id="116009">@nikomatsakis</span> I've opened a PR: <a href="https://github.com/rust-lang/project-ffi-unwind/pull/21" target="_blank" title="https://github.com/rust-lang/project-ffi-unwind/pull/21">https://github.com/rust-lang/project-ffi-unwind/pull/21</a></p>



<a name="188303526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188303526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188303526">(Feb 15 2020 at 23:39)</a>:</h4>
<p>I don't have a way to post it to Rust Internals, so I will leave that to you unless you'd like me to help in some capacity.</p>



<a name="188468471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/sync%20up/near/188468471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/sync.20up.html#188468471">(Feb 18 2020 at 16:53)</a>:</h4>
<p>oh, neat</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>